package hibernate.method.interfaces;

import hibernate.model.EventParticipating;
import hibernate.model.EventsResult;
import hibernate.model.Reservation;
import hibernate.model.User;
import hibernate.model.UserEvent;

import java.util.List;

import org.hibernate.Session;
import org.hibernate.SessionFactory;

public interface EventMethodsInterface {
	
	//public List <Reservation> listReservationsByLocalAndUserOrAnonim(SessionFactory sessionFactory, Session session, int local_id, int user_id);
	public List <UserEvent> listAllUserEvents(SessionFactory sessionFactory, Session session);
	public List <Reservation> listAllReservations(SessionFactory sessionFactory, Session session);
	
	public List<UserEvent> findUserEventById (SessionFactory sesionFactory, Session session, int userEventId);
	
	public void addEvent (SessionFactory sessionFactory, Session session, String name, int local_id, int user_id, String poczatek, String koniec, String opis, Boolean multiple);
	
	public void deleteEvent(SessionFactory sessionFactory, Session session, UserEvent ue);
	
	public List<Reservation> listByUser(SessionFactory sessionFactory, Session session, int user_id);
	
	public void addEventPatricipating(SessionFactory sessionFactory, Session session, int event_id, int user_id, Boolean maybe);
	
	public void deleteParticipating(SessionFactory sessionFactory, Session session, EventParticipating ep);
	
	public void checkIfMaybe(SessionFactory sessionFactory, Session session, EventParticipating ep, Boolean maybe);
	
	public List<EventParticipating> findByUserEvent(SessionFactory sessionFactory, Session session, int user_id, int event_id);
	
	public List<User> listUsersParticipatingForSure(SessionFactory sessionFactory, Session session, int event_id);
	
	public List<User> listUsersParticipatingMaybe (SessionFactory sessionFactory, Session session, int event_id);
	
	public List<EventParticipating> listParticipatingByUser(SessionFactory sessionFactory, Session session, int user_id);
	
	public List<UserEvent> listOrganizingByUser(SessionFactory sessionFactory, Session session, int user_id);
	
	public EventParticipating idToEventParticipating(SessionFactory sessionFactory, Session session, int participating_id);
	
	public int CountAllPatricipians (SessionFactory sessionFactory, Session session, int event_id);
	
	public int countAllReservations( SessionFactory sessionFactory, Session session);
	
	public int countReservationsByLocal (SessionFactory sessionFactory, Session session, int local_id);
	
	public void addEventResult(SessionFactory sessionFactory, Session session, int event_id, int game_id, int user_id, String result);
	
	public void deleteEventResult(SessionFactory sessionFactory, Session session, EventsResult er);
	
	public List<UserEvent> listUserEventByLocal (SessionFactory sessionFactory, Session session, int local_id);
	
}
